package com.chanjiedata.changbs.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chanjiedata.changbs.R;
import com.chanjiedata.changbs.proto.MemberOuterClass;

import java.util.List;

/**
 * 文件名 : ProgressAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/11/25 11:50
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */

public class TiXianMessageAdapter extends BaseQuickAdapter<MemberOuterClass.Pd_cash_list.Pd_cash_list_info, BaseViewHolder> {
    public TiXianMessageAdapter(Context context, List<MemberOuterClass.Pd_cash_list.Pd_cash_list_info> dataList) {
        super(R.layout.item_ti_xian_message, dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, MemberOuterClass.Pd_cash_list.Pd_cash_list_info item) {
        helper.setText(R.id.tv_title, item.getPdcPaymentState())
                .setText(R.id.tv_money, "¥" + item.getPdcAmount())
                .setText(R.id.tv_ti_xian_time, item.getPdcAddtime())
                .setText(R.id.tv_yin_hang, item.getPdcBankName());

        if (TextUtils.isEmpty(item.getPdcPaymentTime())) {
            helper.setText(R.id.tv_dao_zhang_time, item.getPdcExpectTime())
                    .setText(R.id.tv_dao_zhang_ti_shi, "您的提现已经发起");
        } else {
            helper.setText(R.id.tv_dao_zhang_time, item.getPdcExpectTime())
                    .setText(R.id.tv_dao_zhang_ti_shi, "您的提现已到账至银行卡");
        }

    }
}